//////////////////////////////////////////////////////////////////////////
#pragma once


// TODO: Have to fix the apple preprocessing.  Probably by moving them to
// the same place as the 32 bit detections.
#if defined( _WINDOWS ) || (defined( __APPLE__ ) && defined( __SSE2__ ))
namespace Math
{
	namespace Simd
	{
		// All simd types pass by base type.
		template< typename Type >
		struct Param
		{
			typedef Type						Type_t;
		};


		//////////////////////////////////////////////////////////////////////////
		// Mmx base implementation.  NOTE: unless SSE2 is defined, we don't actually
		// use MMX instructions because we don't want all the trash with FPU/MMX
		// register contentions.  I do actually have a dual P3 which still functions
		// but the original MMX is just not worth the effort.
		// Additionally, this is not supported on 64bit builds, so fallback to the
		// reference version.
#	if defined( SIMD_SSE_2 ) && defined( BUILDING_32BIT )
		struct Mmx
		{
			typedef __m64			I8x8_t;
			typedef __m64			U8x8_t;
			typedef __m64			I16x4_t;
			typedef __m64			U16x4_t;
			typedef __m64			I32x2_t;
			typedef __m64			U32x2_t;
			typedef __m64			F32x2_t;
		};
#	else
		typedef struct Reference	Mmx;
#	endif
	}
}
#endif
